A known multi-function peripheral apparatus (image forming apparatus) includes a sensor which detects the opening and closing of a cover and performs a print preparation operation, such as rotating a photosensitive drum when it is determined that the cover is closed.
The image forming apparatus performs a print preparation operation whenever the cover is closed. When the cover is closed, other processes is performed in addition to the print preparation operation. For example, an image forming apparatus determines that, when a cover is closed, a maintenance operation is likely to be performed during the cover being opened and performs an initializing process corresponding to the maintenance operation. Specifically, for example, an image forming apparatus determines that, when a cover is closed, a developing cartridge is likely to be replaced during the cover being opened and performs an old and new developing cartridge identifying process.
However, even when the cover is opened, the maintenance operation is not necessarily performed. Therefore, according to the above-described configuration in which the initializing process is performed whenever the cover is closed, when the maintenance operation is not performed, the initializing process is not useful.